package com.tuanzi.loan.web.lazy.statistics.union;

import com.tuanzi.loan.business.service.statistics.NewUnionLoginStatService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.union.NewUnionLoginStatRequest;
import com.tuanzi.loan.vo.response.statistics.union.NewUnionLoginStatResponse;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 11:22 2019/9/10
 * Description:
 */
public class NewUnionLoginStatLazyDataModel extends BaseLazyDataModel<NewUnionLoginStatRequest, NewUnionLoginStatResponse> {
    private static final long serialVersionUID = 1828980351413509586L;

    private NewUnionLoginStatService newUnionLoginStatService = SpringContextHolder.getBean(NewUnionLoginStatService.class);

    public NewUnionLoginStatLazyDataModel(NewUnionLoginStatRequest newUnionLoginStatRequest) {
        super(newUnionLoginStatRequest);
    }

    @Override
    protected Page<NewUnionLoginStatResponse> doLoad(PageSearcher<NewUnionLoginStatRequest> pageSearcher) {
        return newUnionLoginStatService.list(pageSearcher);
    }
}
